import 'package:flutter/material.dart';
import 'package:hrcapp/utils/theme_colors.dart';

class HRCEvaluationCriteriaScreen extends StatelessWidget {
  const HRCEvaluationCriteriaScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ThemeColors.background,
      appBar: AppBar(
        title: const Text('评估标准'),
        backgroundColor: Colors.white,
        elevation: 1,
        leading: IconButton(
          icon: const Icon(Icons.arrow_back, color: Colors.black),
          onPressed: () {
            Navigator.pop(context);
          },
        ),
      ),
      body: SingleChildScrollView(
        padding: const EdgeInsets.all(20),
        child: Container(
          width: double.infinity,
          padding: const EdgeInsets.all(30),
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.circular(12),
          ),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              // 标准标题
              const Text(
                '苏绣资产评估标准',
                style: TextStyle(
                  fontSize: 18,
                  fontWeight: FontWeight.bold,
                  color: Colors.black,
                ),
              ),
              const SizedBox(height: 20),

              // 艺术价值 - 一级指标
              _buildPrimaryIndicator('1. 艺术价值 (40%)'),
              const SizedBox(height: 15),
              
              // 二级指标
              _buildSecondaryIndicator('1.1 针法复杂度 (15%)'),
              _buildIndicatorItem('- 平针、齐针、乱针等多种针法的运用'),
              _buildIndicatorItem('- 针法细腻程度和均匀度'),
              const SizedBox(height: 15),

              _buildSecondaryIndicator('1.2 色彩运用 (10%)'),
              _buildIndicatorItem('- 色彩搭配的协调性和艺术性'),
              _buildIndicatorItem('- 色彩的层次感和立体感'),
              const SizedBox(height: 15),

              _buildSecondaryIndicator('1.3 题材与构图 (15%)'),
              _buildIndicatorItem('- 题材的文化内涵和艺术价值'),
              _buildIndicatorItem('- 构图的合理性和美学效果'),
              const SizedBox(height: 30),

              // 历史价值 - 一级指标
              _buildPrimaryIndicator('2. 历史价值 (30%)'),
              const SizedBox(height: 15),
              
              // 二级指标
              _buildSecondaryIndicator('2.1 年代与传承 (15%)'),
              _buildIndicatorItem('- 作品的创作年代和历史背景'),
              _buildIndicatorItem('- 传承脉络的清晰度和权威性'),
              const SizedBox(height: 15),

              _buildSecondaryIndicator('2.2 稀有程度 (15%)'),
              _buildIndicatorItem('- 同类作品的存世数量'),
              _buildIndicatorItem('- 作品的独特性和代表性'),
              const SizedBox(height: 30),

              // 保存状况 - 一级指标
              _buildPrimaryIndicator('3. 保存状况 (30%)'),
              const SizedBox(height: 15),
              
              // 二级指标
              _buildSecondaryIndicator('3.1 完整性 (15%)'),
              _buildIndicatorItem('- 作品的完整程度'),
              _buildIndicatorItem('- 有无破损、褪色等问题'),
              const SizedBox(height: 15),
            ],
          ),
        ),
      ),
    );
  }

  // 构建一级指标
  Widget _buildPrimaryIndicator(String title) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
      decoration: BoxDecoration(
        color: ThemeColors.secondary.withOpacity(0.1),
        borderRadius: BorderRadius.circular(6),
      ),
      child: Text(
        title,
        style: TextStyle(
          fontSize: 16,
          fontWeight: FontWeight.bold,
          color: ThemeColors.secondary,
        ),
      ),
    );
  }

  // 构建二级指标
  Widget _buildSecondaryIndicator(String title) {
    return Padding(
      padding: const EdgeInsets.only(left: 10),
      child: Text(
        title,
        style: TextStyle(
          fontSize: 14,
          fontWeight: FontWeight.bold,
          color: Colors.black87,
        ),
      ),
    );
  }

  // 构建指标项
  Widget _buildIndicatorItem(String text) {
    return Padding(
      padding: const EdgeInsets.only(left: 30, top: 5, bottom: 5),
      child: Text(
        text,
        style: TextStyle(
          fontSize: 14,
          color: Colors.black54,
        ),
      ),
    );
  }
}